home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d1
/
l_rmnd16.arc
/
REMIND#2.BAT
< prev
Wrap
DOS Batch File
|
1989-02-01
|
7KB
|
120 lines
echo off
rem ╔════════════════════════════════════════════════════════════════════════╗
rem ║ First, we use LCG/Remind to ask whether or not to load ║
rem ║ our print spooler. Using /i:0 ensures that it will trigger every ║
rem ║ time the system is reboot. The /l:3 gives us 3 seconds to answer the ║
rem ║ question. If no answer is given, the default is to go ahead and load ║
rem ║ the spooler. ║
rem ║ ║
rem ║ The file spooler.msg looks like this: ║
rem ║ ║
rem ║ Would you like to load the 64K ║
rem ║ print spooler? %C ║
rem ╚════════════════════════════════════════════════════════════════════════╝
lcg-rmnd /i:0 /m:spooler.msg /l:3
if errorlevel 3 goto :NOSPOOL
superspl lpt1:/m=64
:NOSPOOL
rem
rem ╔═══════════════════════════════════════════════════════════════════╗
rem ║ This runs our disk optimizer, VOPT.EXE no more than once per day ║
rem ║ (/i:1), and only if it is before 10:00 AM (/tb:1000). ║
rem ║ LCG/Remind will track using the date file vopt.dat. No ║
rem ║ message will be displayed (/m:). If the program triggers the ║
rem ║ errorlevel will be set to 1, otherwise it will be set to 0. ║
rem ╚═══════════════════════════════════════════════════════════════════╝
lcg-rmnd /i:1 /d:vopt.dat /m: /tb:1000
if not errorlevel 1 goto :CHECK2
echo Beginning the Vopt program...
vopt c:
vopt d:
lcg-rmnd /reset /d:vopt.dat
:CHECK2
rem
rem
rem ╔════════════════════════════════════════════════════════════════════╗
rem ║ ║
rem ║ In general, we do a complete back-up once a month, or whenever ║
rem ║ we accumulated more than 5 MB of new files. We do incremental ║
rem ║ back-ups every 5 days. The next command line will trigger on ║
rem ║ the first of each month (/e:01), or, if we are out of the ║
rem ║ office on the first, will trigger at least every 33 days, or ║
rem ║ whenever there is more than 5 MB of data on the c: drive in ║
rem ║ files with their archive bit set (/kt:5000 /pa:a:c:\*.*), but ║
rem ║ NOT if there has been a backup in the past 4 days (/n:4). When ║
rem ║ triggered, it will display the following multiple choice ║
rem ║ message (/m:month.msg): ║
rem ║ ║
rem ║ You last made a complete disk backup ║
rem ║ on %d, and there are %f files that have ║
rem ║ changed since then (%k KB of data). ║
rem ║ ║
rem ║ 1 -- Quit ║
rem ║ 2 -- Make an incremental backup (new files only) ║
rem ║ 3 -- Make a complete disk backup ║
rem ║ ║
rem ║ Your Choice -- %c ║
rem ║ ║
rem ║ LCG/Remind will return an errorlevel of 0 if not triggered, or, ║
rem ║ if triggered will set it according to the answer to the ║
rem ║ question displayed. Because this is a complicated question we ║
rem ║ will allow 180 seconds for an answer (/l:180). ║
rem ║ ║
rem ╚════════════════════════════════════════════════════════════════════╝
lcg-rmnd /i:33 /e:01 /n:4 /kt:5000 /pa:a:c\*.* /d:bu-all.dat /m:month.msg /l:180
if errorlevel 3 goto :COMPLETE
if errorlevel 2 goto :NEWONLY
goto :CHECK3
:COMPLETE
echo Beginning complete backup...
pcbackup c: /b
lcg-rmnd /reset /d:bu-all.dat
goto :DONE
:CHECK3
rem
rem
rem ╔════════════════════════════════════════════════════════════════════╗
rem ║ The next series will "force" a backup if it has been more than 10 ║
rem ║ days, suggest one every Monday, if it has been more than 5 days, ║
rem ║ show a friendly message if the backup has been within the past ║
rem ║ 5 days. It determines this by examining the data files bu-all.dat ║
rem ║ (created everytime a complete backup is made), and bu-new.dat ║
rem ║ (created everytime the new files are backed up). ║
rem ║ which the back-up program automatically creates. ║
rem ║ ║
rem ║ The file force.msg contains this message: ║
rem ║ ║
rem ║ The last disk backup was %n days ║
rem ║ ago (on %d). ║
rem ║ ║
rem ║ A new backup is overdue. ║
rem ║ ║
rem ║ The file ask.msg contains this message: ║
rem ║ ║
rem ║ Your hard disks have not been backed ║
rem ║ ║
rem ║ Would you like to run your backup ║
rem ║ program now? %c ║
rem ║ ║
rem ║ The file friendly.msg looks like this: ║
rem ║ ║
rem ║ Your hard disk was last backed up ║
rem ║ on %d. ║
rem ╚════════════════════════════════════════════════════════════════════╝
lcg-rmnd /i:10 /d:bu*.dat /m:force.msg /s
if errorlevel 1 goto :NEWONLY
lcg-rmnd /w:1 /n:5 /d:bu*.dat /m:ask.msg
if errorlevel 3 goto :DONE
if errorlevel 2 goto :NEWONLY
if errorlevel 1 goto :DONE
goto :CHECK4
:NEWONLY
echo Beginning incremental backup (new files only)...
pcbackup c: /m /b
lcg-rmnd /reset /d:bu-new.dat
goto :DONE
:CHECK4
lcg-rmnd /i:0 /d:bu*.dat /m:friendly.msg /l:5
:DONE
echo Done with remind#2.bat